/**
 * 只能存储函数,将函数排成队列.
 */
export class PromiseSerialQueue {
  promiseCount:number = 0;
  currentPromise:Promise<any>|null;

  addPromise(p:Promise<any>) {
    if(this.promiseCount == 0) {
      this.p = p.then(()=>{
        this.clear();
      });
    }
    else {
      this.p 
    }
    this.promiseCount++;

  }

  clear() {

  }
}